#include "GameOverScene.h"



GameOverScene::GameOverScene()
{
	_startTime=GetTickCount();
	ResourceManager::GetInstance()->GetSound(ResourceManager::GetInstance()->SoundName.GameOver)->Play(false);
}


GameOverScene::~GameOverScene()
{
}




void GameOverScene::Update(float DeltaTime)
{

	float delta=GetTickCount()-_startTime;
	if(delta>=4000)
	{
		SceneManager::GetInstance()->GoToFirst();

	}	
}

void GameOverScene::Render()
{
	ResourceManager *_ResourceManager=ResourceManager::GetInstance();

	

	/*_ResourceManager->GetSurface(_ResourceManager->SurfaceName.PauseScene_Background)->Draw(_backBuffer,NULL,NULL);*/
	ResourceManager::GetInstance()->GetSurface(ResourceManager::GetInstance()->SurfaceName.GameOver_Background)->Draw(_backBuffer, NULL, NULL );

}

void GameOverScene::Leave()
{
	// Giai phong bo nho
	ResourceManager::GetInstance()->GetSound(ResourceManager::GetInstance()->SoundName.GameOver)->Stop();
	
}

void GameOverScene::Pause()
{
	// Tam thoi ngung hoat dong
	ResourceManager::GetInstance()->GetSound(ResourceManager::GetInstance()->SoundName.GameOver)->Stop();
}

void GameOverScene::Resume()
{
	// Tai hoat dong
	ResourceManager::GetInstance()->GetSound(ResourceManager::GetInstance()->SoundName.GameOver)->Play(false);
}
